import javax.swing.*;

public class GameJFrame extends JFrame {
    GameJFrame(){
        GameJPanel gameJPanel=new GameJPanel();
        this.add(gameJPanel);
        this.addKeyListener(gameJPanel);
        Thread thread=new Thread(gameJPanel);
        thread.start();
        this.setSize(700,500);
        this.setLocation(200,200);
        this.setVisible(true);
        this.setDefaultCloseOperation(HIDE_ON_CLOSE);
    }
}
